
import siginInConfigApi from '@/api/declaration/mall/siginInConfigApi'
import httpRequest from '@/config/axios/httpRequest'
import { SignInConfigModel } from '@/models/mall/SignInConfigModel'



// 查询积分签到规则列表
export const getSignInConfigList = async () => {
  return await httpRequest.get(siginInConfigApi.GetSignInConfigList)
}

// 查询积分签到规则详情
export const getSignInConfig = async (id: number) => {
  return await httpRequest.get(siginInConfigApi.GetSignInConfig, { params: { id } })
}

// 新增积分签到规则
export const createSignInConfig = async (data: SignInConfigModel) => {
  return await httpRequest.post(siginInConfigApi.CreateSignInConfig, data)
}

// 修改积分签到规则
export const updateSignInConfig = async (data: SignInConfigModel) => {
  return await httpRequest.put(siginInConfigApi.UpdateSignInConfig, data)
}

// 删除积分签到规则
export const deleteSignInConfig = async (id: number) => {
  return await httpRequest.delete(siginInConfigApi.DeleteSignInConfig, { params: { id } })
}
